package loengud.w15;

public class VariableScopeExercise {

	public static int a = 10;
	public static int b = 2;
	public static void main(String[] args) {
		System.out.println("1 a:" + a);
		System.out.println(foo(a));
		
		System.out.println("2 a:" + a);
		System.out.println(foo(a));
		
		System.out.println(foo(bar(b)));
		System.out.println("3 a:" + a);
		System.out.println("b: " + b);

	}
	
	public static int foo(int a) {
		a++;
		b++;
		return a;
	}
	
	public static int bar(int b) {
		a++;
		b++;
		return a;
	}

}
